package com.fjnu.entity;

import java.util.Date;
import java.util.List;

/**
 * @desc:
 * @author: Ping
 * @date: 2025/9/22 9:03
 */

public class Role {
    /**
     * todo: 补充完成Role的各属性，尤其Role关联的多个permission属性
     */

    private Integer id;
    private String roleId;
    private String name;
    private String description;
    private Integer status;
    private Date createTime;
    private Date updateTime;

    // 构造器、Getter和Setter方法
    public Role() {}

    public Role(String roleId, String name) {
        this.roleId = roleId;
        this.name = name;
        this.createTime = new Date();
        this.updateTime = new Date();
    }

    // Getter和Setter方法...
    public Integer getId() { return id; }
    public void setId(Integer id) { this.id = id; }

    public String getRoleId() { return roleId; }
    public void setRoleId(String roleId) { this.roleId = roleId; }

    public String getName() { return name; }
    public void setName(String name) { this.name = name; }

    public String getDescription() { return description; }
    public void setDescription(String description) { this.description = description; }

    public Integer getStatus() { return status; }
    public void setStatus(Integer status) { this.status = status; }

    public Date getCreateTime() { return createTime; }
    public void setCreateTime(Date createTime) { this.createTime = createTime; }

    public Date getUpdateTime() { return updateTime; }
    public void setUpdateTime(Date updateTime) { this.updateTime = updateTime; }

    @Override
    public String toString() {
        return "Role{" +
                "roleId='" + roleId + '\'' +
                ", name='" + name + '\'' +
                ", description='" + description + '\'' +
                '}';
    }

    List<Permission> permissions;
}
